import request from '../../utils/request'
export function add(params){
  return request.ajax({
    url:'/mall/cart/add',
    method:'post',
    params
  })
}

export function getCount(){
  return request.ajax({
    url:'/mall/cart/getCount',
    method:'post'
  })
}
export function update(params){
  return request.ajax({
    url:'/mall/cart/update',
    method:'post',
    params
  })
}
export function flushSingle(id){
  return request.ajax({
    url:`/mall/cart/flushSingle/${id}`,
    method:'post'
  })
}
export function getList(){
  return request.ajax({
    url:`/mall/cart/getList`,
    method:'post'
  })
}
export function getLapseList(){
  return request.ajax({
    url:`/mall/cart/getLapseList`,
    method:'post'
  })
}
export function clear(params){
  return request.ajax({
    url:`/mall/cart/clear`,
    method:'post',
    params
  })
}
export function getCanUse(){
  return request.ajax({
    url:`/mall/cart/canUseList`,
    method:'post',
    isJson:true
  })
}



